package com.jdrx.ocp.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.util.Assert;

/**
 * @ClassName:
 * @Description:
 * @author: yangfang
 * @date: 2018/11/22 17:52
 */
@Configuration
@ConfigurationProperties("jwt")
public class JWTAuthConfig {


    String signingKey;

    int expiredSeconds;// = 24*60*60;

    public int getExpiredSeconds() {
        return expiredSeconds;
    }

    public void setExpiredSeconds(int expiredSeconds) {
        this.expiredSeconds = expiredSeconds;
    }

    public String getSigningKey() { Assert.notNull(signingKey,"jwt.signing-key 不能为空");
        return signingKey;
    }

    public void setSigningKey(String signingKey) {
        this.signingKey = signingKey;
    }

}
